package csce482.groupgraffiti.com;

import android.app.Activity;
import android.content.*;
import android.os.Bundle;
import android.view.View;
import android.widget.*;

public class Home extends Activity {

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	
	    setContentView(R.layout.home);
	    
	    GroupGraffitiApp gga = (GroupGraffitiApp)getApplicationContext();
	    TextView t=new TextView(this); 
	    t=(TextView)findViewById(R.id.textView1); 
	    t.setText("Welcome, " + gga.username);
	    
	}
	
	// Logs the user out of the application
	public void logoutUser(View view){
		GroupGraffitiApp gga = (GroupGraffitiApp)getApplicationContext();
		gga.loggedIn = false;
		gga.username = "";
		Intent intent = new Intent(Home.this, Login.class);
		startActivity(intent);
	}
	
	// Navigates to the Friends screen
	public void viewFriends(View view){
		Toast viewToast = Toast.makeText(this, "Not yet implemented!", Toast.LENGTH_SHORT);
		viewToast.show();
	}
	
	// Navigates to the Notifications screen
	public void viewNotifications(View view){
		Toast viewToast = Toast.makeText(this, "Not yet implemented!", Toast.LENGTH_SHORT);
		viewToast.show();
	}
	
	// Navigates to the My Groups screen
		public void viewMyGroups(View view){
			Toast viewToast = Toast.makeText(this, "Not yet implemented!", Toast.LENGTH_SHORT);
			viewToast.show();
		}

}
